package dch.service.admin.impl;

import dch.entity.Types;
import dch.persistent.admin.dao.TypesDao;
import dch.persistent.admin.impl.TypesDaoImpl;
import dch.service.admin.dao.TypeService;

public class TypeServiceImpl implements TypeService {

	TypesDao typeDao=null;
	
	public TypeServiceImpl(){
		typeDao=new TypesDaoImpl();
	}
	@Override
	public Types addType(Types type,int fatherId) {
		return typeDao.insert(type,fatherId);
	}

	@Override
	public void deleteType(int id) {
		typeDao.delete(id);
	}
	@Override
	public void updateType(Types type,int id) {
		typeDao.update(type,id);
	}
	
	public void close(){
		typeDao.close();
	}
}
